package com.ruoyi.system.service;

import java.util.HashMap;
import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.IndsvrSsoAppUserMap;
import com.ruoyi.system.domain.IndsvrSsoAppUserMapRoot;
import jakarta.servlet.http.HttpServletRequest;

/**
 * 账号分配Service接口
 * 
 * @author indsvr
 * @date 2025-07-04
 */
public interface IIndsvrSsoAppUserMapRootService 
{
    /**
     * 查询账号分配
     * 
     * @param id 账号分配主键
     * @return 账号分配
     */
    public IndsvrSsoAppUserMapRoot selectIndsvrSsoAppUserMapRootById(Long id);

    /**
     * 查询账号分配列表
     * 
     * @param indsvrSsoAppUserMapRoot 账号分配
     * @return 账号分配集合
     */
    public List<IndsvrSsoAppUserMapRoot> selectIndsvrSsoAppUserMapRootList(IndsvrSsoAppUserMapRoot indsvrSsoAppUserMapRoot);

    /**
     * 新增账号分配
     * 
     * @param indsvrSsoAppUserMapRoot 账号分配
     * @return 结果
     */
    public int insertIndsvrSsoAppUserMapRoot(IndsvrSsoAppUserMapRoot indsvrSsoAppUserMapRoot);

    /**
     * 修改账号分配
     * 
     * @param indsvrSsoAppUserMapRoot 账号分配
     * @return 结果
     */
    public int updateIndsvrSsoAppUserMapRoot(IndsvrSsoAppUserMapRoot indsvrSsoAppUserMapRoot);

    /**
     * 批量删除账号分配
     * 
     * @param ids 需要删除的账号分配主键集合
     * @return 结果
     */
    public int deleteIndsvrSsoAppUserMapRootByIds(Long[] ids);

    /**
     * 删除账号分配信息
     * 
     * @param id 账号分配主键
     * @return 结果
     */
    public int deleteIndsvrSsoAppUserMapRootById(Long id);

    HashMap<String, String> auth(Long appId, String redirect, String state, SysUser user);

    long switchSsoType(String code);

    HashMap<String,Object> accessTokenBy0(String code, HttpServletRequest request) throws Exception;

    IndsvrSsoAppUserMap accessTokenBy1(String code);

    HashMap<String, Object> accessTokenBy2(String code, String client_secret);

    String accessTokenBy99(String code, String state, HttpServletRequest request) throws Exception;
}
